![]() |
Synalyze It!
1.10
|
The StructureMapper class. More...
Public Member Functions | |
| long | mapStructure (Structure structure) |
| Map a structure at the current position to a file. More... | |
| long | mapStructureAtPosition (Structure structure, long position, long size) |
| Map a structure at the given position to a file. More... | |
| long | mapElementWithSize (Element element, int maxSize) |
| Map an element at the current position to a file. Maximum size is specified in bytes. More... | |
| long | mapElementWithSizeBits (Element element, int maxSize) |
| Map an element at the current position to a file. Maximum size is specified in bits. More... | |
| setDynamicEndianness (ENDIAN_TYPE endianness) | |
| Set dynamic endianness. More... | |
| ENDIAN_TYPE | getDynamicEndianness () |
| Get endianness set currently. More... | |
| ByteArray | getCurrentByteArray () |
| Current byte array being processed. More... | |
| ByteView | getCurrentByteView () |
| Current byte view being processed. More... | |
| Grammar | getCurrentGrammar () |
| Current grammar being processed. More... | |
| LogSrc | getCurrentLogSrc () |
| Current log source used for output. More... | |
| Results | getCurrentResults () |
| Current results used while mapping structures. More... | |
| Structure | getCurrentStructure () |
| Current structure being mapped. More... | |
| Element | getCurrentElement () |
| Current structure element being mapped. This is of course the scripting element... More... | |
| long | getCurrentOffset () |
| Current file offset of the mapping operation. More... | |
| setCurrentOffset (unsigned long offset) | |
| Set current file offset of the mapping operation. More... | |
| long | getCurrentRemainingSize () |
| Current remaining size of the mapping operation. More... | |
| process () | |
| Process file and return results. More... | |
| dump (outputFile) | |
| Process file and write results to file. More... | |
The StructureMapper class.
A structure mapper object maps the structures of a grammar to a file (ByteView / ByteArray).
| dump | ( | outputFile | ) |
Process file and write results to file.
| [in] | outputFile | Name of output file |
| ByteArray getCurrentByteArray | ( | ) |
Current byte array being processed.
| ByteView getCurrentByteView | ( | ) |
Current byte view being processed.
| Element getCurrentElement | ( | ) |
Current structure element being mapped. This is of course the scripting element...
| Grammar getCurrentGrammar | ( | ) |
Current grammar being processed.
| LogSrc getCurrentLogSrc | ( | ) |
Current log source used for output.
| long getCurrentOffset | ( | ) |
Current file offset of the mapping operation.
| long getCurrentRemainingSize | ( | ) |
Current remaining size of the mapping operation.
| Results getCurrentResults | ( | ) |
Current results used while mapping structures.
| Structure getCurrentStructure | ( | ) |
Current structure being mapped.
| ENDIAN_TYPE getDynamicEndianness | ( | ) |
Get endianness set currently.
The returned endianness is used by structure elements having set their endianness to dynamic.
| long mapElementWithSize | ( | Element | element, |
| int | maxSize | ||
| ) |
Map an element at the current position to a file. Maximum size is specified in bytes.
The maximum length the element may take is also passed.
| [in] | element | The element to be applied |
| [in] | maxSize | The maximum size the element may have in bytes |
| long mapElementWithSizeBits | ( | Element | element, |
| int | maxSize | ||
| ) |
Map an element at the current position to a file. Maximum size is specified in bits.
The maximum length the element may take is also passed. (in bits)
| [in] | element | The element to be applied |
| [in] | maxSizeBits | The maximum size the element may have in bits |
| long mapStructure | ( | Structure | structure | ) |
Map a structure at the current position to a file.
The length of the structure is added in the results to the enclosing structure.
| [in] | structure | The structure to apply |
| long mapStructureAtPosition | ( | Structure | structure, |
| long | position, | ||
| long | size | ||
| ) |
Map a structure at the given position to a file.
The length of the structure is not added in the results to the enclosing structure.
| [in] | structure | The structure to apply |
| [in] | position | Where to apply the structure |
| [in] | size | Maximum space the structure can consume |
| process | ( | ) |
Process file and return results.
| setCurrentOffset | ( | unsigned long | offset | ) |
Set current file offset of the mapping operation.
| [in] | offset | New offset to continue processing after script |
| setDynamicEndianness | ( | ENDIAN_TYPE | endianness | ) |
Set dynamic endianness.
This endianness will be used by structure elements having set their endianness to dynamic.
| [in] | endianness | The endianness to use from now on |
1.8.14